<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML DIR="LTR">
	<HEAD>
		<TITLE>HarePoint Explorer for SharePoint - Where is the list of sites located in the object model?</TITLE>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
		<META NAME="Product" CONTENT="HarePoint Explorer for SharePoint">
		<META NAME="CHARSET" CONTENT="iso-8859-1">
		<META NAME="KEYWORDS" CONTENT="">
		<LINK REL="stylesheet" MEDIA="SCREEN" TYPE="text/css" HREF="../css/mailto_exchange.css">
			<LINK REL="stylesheet" TYPE="text/css" HREF="../css/coUA_Ex.css">
				<LINK REL="stylesheet" TYPE="text/css" HREF="../css/coUA.css">
					<LINK REL="stylesheet" MEDIA="PRINT" TYPE="text/css" HREF="../css/CoUA_Print.css">
						<SCRIPT LANGUAGE="JScript" SRC="../scr/shared.js"></SCRIPT>
						<SCRIPT LANGUAGE="javascript" SRC="../scr/mailto.en.js"></SCRIPT>
	</HEAD>
	<BODY>
		<DIV CLASS="titleNodeLevel1">HarePoint Explorer for SharePoint - Where is the list of sites located in the object model?</DIV>
		<DIV CLASS="titleNodeLevel2">&nbsp;</DIV>
		<H1>Where is the list of sites located in the object model?</H1>

<p>Probably, the first question, which a developer can ask at the first launch of HarePoint Explorer for SharePoint, is going to be the following: "And where are the sites here?"</p>

<p>The answer is simple. In order to find the list of sites created in SharePoint, the following must be done:
<ol>
<li> Find and expand node that conforms to property <b>Services</b>.</li>
<li> Expand node <b>Collection Items</b> to get the list of services included in SharePoint farm.</li>
<li> In the list of services find service, the name of which starts with <b>SPWebService Parent=SPFarm Name=SharePoint_Config_</b>.</li>
<li> Expand node of property <b>WebApplications</b> containing the list of web-applications.</li>
<li> In node <b>Collection Items</b> find object with the name <b>SPWebApplication Name=SharePoint - 80 Parent=SPWebService</b>.</li>
<li> Expand node of property <b>Sites</b>. This node contains the list of site collections created in the context of previously selected web-application.</li>
<li> In node <b>Collection Items</b> select one of the collections.</li>
<li> And finally, by expanding <b>AllWebs</b>, <b>Collection Items</b> sequentially, we will see the necessary list of sites.</li>
</ol>
</p>

<p>From the first sight, this process may appear as complicated and tiresome. But attention must be paid to the fact that even during realization of such simple task, we get a lot of information about the object model of SharePoint! Particularly, it becomes clear that besides web-services, there are many other useful services in SharePoint: diagnostic services, timers, administrative services, etc. It is obvious that there can be a lot of web-applications, site collections and other items of infrastructure. All this information is irreplaceable for proper development of SharePoint solutions. Also it is important that all this information we get without write a single line of code, without any tests!</p>

<SCRIPT LANGUAGE="jscript" SRC="../scr/mkfoot.en.js"></SCRIPT>
</BODY>
</HTML>